Assignemnt #26 and twenty-third Program
Code
///Name: Derrick Andreasen
///Period: 7
///Program name: Twenty-third Program
///File name: TwetProg.java
///Date Finished:9/25/2015
import java.util.Scanner;
public class TwetProg
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
double m, kg, bmi;
System.out.print( "Your height in m: " );
m = keyboard.nextDouble();
System.out.print( "Your weight in kg: " );
kg = keyboard.nextDouble();
bmi = kg / (m*m);
System.out.println( "Your BMI is " + bmi );
}
}
Picture of the output